/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * configClima.java
 *
 * Created on 14/09/2012, 06:04:29 PM
 */
package interfaz;

import java.awt.Color;

/**
 *
 * @author Isis
 */
public class configClima extends javax.swing.JPanel {

    /** Creates new form configClima */
    public configClima() {
        initComponents();
         this.seleccionado="soleado";
         this.setLayout(null);
         this.setBounds(0, 0, 450, 175);
         this.bSoleado.setBounds(10, 10, 150, 175);
         this.bNublado.setBounds(190, 10, 150, 175);
         this.bLluvioso.setBounds(370, 10, 150, 175);
         this.bNiebla.setBounds(10, 195, 150, 175);
         this.bNevando.setBounds(190, 195, 150, 175);
         this.aceptar.setBounds(190, 450, 30, 30);
         this.cancelar.setBounds(300, 450, 30, 30);
       this.bSoleado.setBackground(Color.BLUE);
       this.bLluvioso.setBackground(Color.lightGray);
       this.bNevando.setBackground(Color.lightGray);
       this.bNiebla.setBackground(Color.lightGray);
       this.bNublado.setBackground(Color.lightGray);    

    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        bSoleado = new javax.swing.JPanel();
        iconSoleado = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        bLluvioso = new javax.swing.JPanel();
        iconLluvioso = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        bNevando = new javax.swing.JPanel();
        iconNevando = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        bNiebla = new javax.swing.JPanel();
        iconNiebla = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        aceptar = new javax.swing.JLabel();
        cancelar = new javax.swing.JLabel();
        bNublado = new javax.swing.JPanel();
        iconNublado = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();

        setBackground(new java.awt.Color(199, 105, 38));

        iconSoleado.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/sun.png"))); // NOI18N
        iconSoleado.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                iconSoleadoMouseClicked(evt);
            }
        });

        jLabel5.setText("SOLEADO");

        javax.swing.GroupLayout bSoleadoLayout = new javax.swing.GroupLayout(bSoleado);
        bSoleado.setLayout(bSoleadoLayout);
        bSoleadoLayout.setHorizontalGroup(
            bSoleadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(bSoleadoLayout.createSequentialGroup()
                .addGroup(bSoleadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(bSoleadoLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(iconSoleado))
                    .addGroup(bSoleadoLayout.createSequentialGroup()
                        .addGap(50, 50, 50)
                        .addComponent(jLabel5)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        bSoleadoLayout.setVerticalGroup(
            bSoleadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(bSoleadoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(iconSoleado)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel5))
        );

        iconLluvioso.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/clouds_rain.png"))); // NOI18N
        iconLluvioso.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                iconLluviosoMouseClicked(evt);
            }
        });

        jLabel6.setText("LLUVIOSO");

        javax.swing.GroupLayout bLluviosoLayout = new javax.swing.GroupLayout(bLluvioso);
        bLluvioso.setLayout(bLluviosoLayout);
        bLluviosoLayout.setHorizontalGroup(
            bLluviosoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(bLluviosoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(iconLluvioso)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, bLluviosoLayout.createSequentialGroup()
                .addContainerGap(51, Short.MAX_VALUE)
                .addComponent(jLabel6)
                .addGap(48, 48, 48))
        );
        bLluviosoLayout.setVerticalGroup(
            bLluviosoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(bLluviosoLayout.createSequentialGroup()
                .addGap(4, 4, 4)
                .addComponent(iconLluvioso)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel6)
                .addContainerGap(2, Short.MAX_VALUE))
        );

        iconNevando.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/clouds_snow.png"))); // NOI18N
        iconNevando.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                iconNevandoMouseClicked(evt);
            }
        });

        jLabel8.setText("NEVANDO");

        javax.swing.GroupLayout bNevandoLayout = new javax.swing.GroupLayout(bNevando);
        bNevando.setLayout(bNevandoLayout);
        bNevandoLayout.setHorizontalGroup(
            bNevandoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(bNevandoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(iconNevando))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, bNevandoLayout.createSequentialGroup()
                .addContainerGap(45, Short.MAX_VALUE)
                .addComponent(jLabel8)
                .addGap(45, 45, 45))
        );
        bNevandoLayout.setVerticalGroup(
            bNevandoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(bNevandoLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(iconNevando)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel8))
        );

        iconNiebla.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/clouds.png"))); // NOI18N
        iconNiebla.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                iconNieblaMouseClicked(evt);
            }
        });

        jLabel10.setText("NIEBLA");

        javax.swing.GroupLayout bNieblaLayout = new javax.swing.GroupLayout(bNiebla);
        bNiebla.setLayout(bNieblaLayout);
        bNieblaLayout.setHorizontalGroup(
            bNieblaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(bNieblaLayout.createSequentialGroup()
                .addGroup(bNieblaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(bNieblaLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(iconNiebla))
                    .addGroup(bNieblaLayout.createSequentialGroup()
                        .addGap(54, 54, 54)
                        .addComponent(jLabel10)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        bNieblaLayout.setVerticalGroup(
            bNieblaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(bNieblaLayout.createSequentialGroup()
                .addComponent(iconNiebla)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel10)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        aceptar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/accept_item.png"))); // NOI18N
        aceptar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                aceptarMouseClicked(evt);
            }
        });

        cancelar.setBackground(new java.awt.Color(199, 155, 123));
        cancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/delete_item.png"))); // NOI18N
        cancelar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                cancelarMouseClicked(evt);
            }
        });

        iconNublado.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/sun_clouds.png"))); // NOI18N
        iconNublado.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                iconNubladoMouseClicked(evt);
            }
        });

        jLabel12.setText("NUBLADO");

        javax.swing.GroupLayout bNubladoLayout = new javax.swing.GroupLayout(bNublado);
        bNublado.setLayout(bNubladoLayout);
        bNubladoLayout.setHorizontalGroup(
            bNubladoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(bNubladoLayout.createSequentialGroup()
                .addGroup(bNubladoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(bNubladoLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(iconNublado))
                    .addGroup(bNubladoLayout.createSequentialGroup()
                        .addGap(53, 53, 53)
                        .addComponent(jLabel12)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        bNubladoLayout.setVerticalGroup(
            bNubladoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(bNubladoLayout.createSequentialGroup()
                .addComponent(iconNublado)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel12)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(41, 41, 41)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(bSoleado, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGap(18, 18, 18)
                        .addComponent(bLluvioso, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(bNiebla, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(aceptar)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 84, Short.MAX_VALUE)
                                .addComponent(cancelar))
                            .addComponent(bNublado, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                .addGap(18, 18, 18)
                .addComponent(bNevando, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(33, 33, 33))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(bNevando, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(bLluvioso, 0, 159, Short.MAX_VALUE)
                    .addComponent(bSoleado, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(bNublado, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(bNiebla, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(aceptar)
                    .addComponent(cancelar))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void aceptarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_aceptarMouseClicked
        // TODO add your handling code here:
        this.setVisible(false);
        interfaz.principal.activarIcono(interfaz.principal.iconoAyuda);
        interfaz.principal.activarIcono(interfaz.principal.iconoHome);
        interfaz.principal.activarIcono(interfaz.principal.iconoConfig);
        interfaz.principal.activarIcono(interfaz.principal.iconoInfo);
        interfaz.principal.activarIcono(interfaz.principal.iconoMapa);
         interfaz.variables.enUso=0;


    }//GEN-LAST:event_aceptarMouseClicked

    private void cancelarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cancelarMouseClicked
     // TODO add your handling code here:
         this.setVisible(false);  
        interfaz.principal.activarIcono(interfaz.principal.iconoAyuda);
        interfaz.principal.activarIcono(interfaz.principal.iconoHome);
        interfaz.principal.activarIcono(interfaz.principal.iconoConfig);
        interfaz.principal.activarIcono(interfaz.principal.iconoInfo);
        interfaz.principal.activarIcono(interfaz.principal.iconoMapa);
         interfaz.variables.enUso=0;
      

    }//GEN-LAST:event_cancelarMouseClicked

    private void iconSoleadoMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_iconSoleadoMouseClicked
        // TODO add your handling code here:
       this.bSoleado.setBackground(Color.BLUE);
       this.bLluvioso.setBackground(Color.lightGray);
       this.bNevando.setBackground(Color.lightGray);
       this.bNiebla.setBackground(Color.lightGray);
       this.bNublado.setBackground(Color.lightGray);     
       this.enviarDatos("soleado");
    }//GEN-LAST:event_iconSoleadoMouseClicked

    private void iconNubladoMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_iconNubladoMouseClicked
        // TODO add your handling code here:
        this.bSoleado.setBackground(Color.lightGray);
       this.bLluvioso.setBackground(Color.lightGray);
       this.bNevando.setBackground(Color.lightGray);
       this.bNiebla.setBackground(Color.lightGray);
       this.bNublado.setBackground(Color.BLUE);     
       this.enviarDatos("nublado");
    }//GEN-LAST:event_iconNubladoMouseClicked

    private void iconLluviosoMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_iconLluviosoMouseClicked
        this.bSoleado.setBackground(Color.lightGray);
       this.bLluvioso.setBackground(Color.BLUE);
       this.bNevando.setBackground(Color.lightGray);
       this.bNiebla.setBackground(Color.lightGray);
       this.bNublado.setBackground(Color.lightGray);     
       this.enviarDatos("lluvioso");        // TODO add your handling code here:
    }//GEN-LAST:event_iconLluviosoMouseClicked

    private void iconNevandoMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_iconNevandoMouseClicked
        // TODO add your handling code here:
         this.bSoleado.setBackground(Color.lightGray);
       this.bLluvioso.setBackground(Color.lightGray);
       this.bNevando.setBackground(Color.BLUE);
       this.bNiebla.setBackground(Color.lightGray);
       this.bNublado.setBackground(Color.lightGray);     
       this.enviarDatos("nevando");  
    }//GEN-LAST:event_iconNevandoMouseClicked

    private void iconNieblaMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_iconNieblaMouseClicked
        // TODO add your handling code here:
           this.bSoleado.setBackground(Color.lightGray);
       this.bLluvioso.setBackground(Color.lightGray);
       this.bNevando.setBackground(Color.lightGray);
       this.bNiebla.setBackground(Color.BLUE);
       this.bNublado.setBackground(Color.lightGray);     
       this.enviarDatos("niebla"); 
    }//GEN-LAST:event_iconNieblaMouseClicked

   public void enviarDatos(String Dato)
   {
   this.seleccionado=Dato;
   };
   
   public String seleccionado="";
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel aceptar;
    private javax.swing.JPanel bLluvioso;
    private javax.swing.JPanel bNevando;
    private javax.swing.JPanel bNiebla;
    private javax.swing.JPanel bNublado;
    private javax.swing.JPanel bSoleado;
    private javax.swing.JLabel cancelar;
    private javax.swing.JLabel iconLluvioso;
    private javax.swing.JLabel iconNevando;
    private javax.swing.JLabel iconNiebla;
    private javax.swing.JLabel iconNublado;
    private javax.swing.JLabel iconSoleado;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel8;
    // End of variables declaration//GEN-END:variables
}
